import 'package:json_annotation/json_annotation.dart';

part 'artist_list.g.dart';

@JsonSerializable()
class ArtistList {
  final List<Records>? records;
  final int? total;
  final int? size;
  final int? current;
  final List<dynamic>? orders;
  final bool? optimizeCountSql;
  final bool? hitCount;
  final dynamic countId;
  final dynamic maxLimit;
  final bool? searchCount;
  final int? pages;

  const ArtistList({
    this.records,
    this.total,
    this.size,
    this.current,
    this.orders,
    this.optimizeCountSql,
    this.hitCount,
    this.countId,
    this.maxLimit,
    this.searchCount,
    this.pages,
  });

  factory ArtistList.fromJson(Map<String, dynamic> json) =>
      _$ArtistListFromJson(json);

  Map<String, dynamic> toJson() => _$ArtistListToJson(this);
}

@JsonSerializable()
class Records {
  final String? id;
  final String? name;
  final String? pic;
  final String? stageName;
  final String? birthday;
  final String? note;

  const Records({
    this.id,
    this.name,
    this.pic,
    this.stageName,
    this.birthday,
    this.note,
  });

  factory Records.fromJson(Map<String, dynamic> json) =>
      _$RecordsFromJson(json);

  Map<String, dynamic> toJson() => _$RecordsToJson(this);
}
